Method of filtering a disparity mesh obtained from pixel images

ABSTRACT

A method of filtering a disparity mesh from pixel images according to the invention, where the disparity mesh comprises a plurality of points, where each point is associated with values of two planar coordinates (X, Y) and a disparity value (D) and where the values are quantization pitches, comprises the step: filtering planes by filtering 2D-lines in 2D-spaces (X-D, Y-D) of the planar coordinates (X,Y) and the disparity (D).

This application claims the benefit, under 35 U.S.C. §119 of EP PatentApplication 11306654.2, filed 14 Dec. 2011.

1. SCOPE OF THE INVENTION

The invention concerns a method of filtering a disparity mesh obtainedfrom pixel images.

2. PRIOR ART

A disparity mesh comprises a plurality of points, where each point isassociated with values of two planar coordinates and with a disparityvalue. Generally, the planar coordinates indicate the position of thepoint within the images and the disparity value indicates a depth (or aheight) of the corresponding point. The values of the planar coordinatesand of the disparity value are quantization pitches, in particular,integers.

Such disparity meshes are e.g. elevation grids or disparity (depth)maps. An elevation grid is obtained from sensors which providessatellite, airplane, terrestrial or other pictures and videos.

A disparity map is obtained from a multiview video, such as from 3DTV orrobot vision, with 2 and more cameras. As an example, a disparity map isgenerated by triangulation method when using a couple of sensors, e.g.video sensors with Z axis aligned.

A disparity mesh, namely an elevation map, is also obtained from a Lidar(light detection and ranging) intensity images. Lidar is a technologythat allows measuring distances thanks to the return time, time offlight, of a pulsed light generated by a laser. Under certainconditions, there is a direct relation between disparity and depthelevation information generated by a Lidar, where the disparitycorresponds to: focal_length*sensor_distance/depth.

Filtering a disparity mesh is used for (three-dimensional) 3D videoproduction and 3D models.

A method of converting a physical object into a three-dimensionaldigital model (3D model) is described in U.S. Pat. No. 6,377,865 B1. Themethod acquires a set of measured data points on the surface of aphysical model. From the measured data points, the method reconstructs adigital model of the physical object using a Delaunay complex of thepoints, a flow structure of the simplices in the Delaunay complex andretracting the Delaunay complex into a digital model of the physicalobject using the flow structure. The three-dimensional digital model ismodified using a shape improvement method selected from: data relaxationby filtering out high surface frequencies, surfaces refinement bydecomposing edges and triangles and surface thickening.

In the article of Lai Xudong et al., Chinese Journal of Lasers, October2005, a kind of filtering algorithms for Lidar (light detection andranging) intensity images based on flatness terrain is disclosed.According to the character of Lidar data, a fusion mean filteringalgorithm based on the flatness of terrain is proposed.

When producing 3D videos or 3D models, it is often required to decreasethe amount of information. Decreasing the amount of information of adisparity mesh, where the points are represented by quantizationpitches, often causes additional steps or irregularities, mentioned asquantization noise.

It is therefore desirable to improve a method of filtering a disparitymesh in order to diminish quantization noise for further processing thedata of the disparity mesh.

3. SUMMARY OF THE INVENTION

According to the invention this is achieved by the features of claim 1.Possible advantages embodiments are specified in the dependent claims.

A method of filtering a disparity mesh from pixel images according tothe invention is described below, where the disparity mesh comprises aplurality of points, where each point is associated with values of twoplanar coordinates X, Y and a disparity D value and where the values arequantization pitches. The method comprises the step: filtering planes byfiltering (two-dimensional) 2D-lines in 2D-spaces X-D, Y-D of the planarcoordinates X, Y and the disparity D.

The step filtering planes diminishes aliasing on theoretically planesurfaces which occurs during images processing, in particular, duringfiltering and diminishing data amounts. Filtering 2D-planes by filtering2D-lines, i.e. filtering lines in the 2D-spaces X-D, Y-D of the planarcoordinates X, Y and the disparity D is an easy to perform and effectivefiltering method.

In addition, a method according to the invention which diminishes theamount of steps of quantization enables further processing of the data,e.g., in order to degrease the number of triangles. Filtering adisparity mesh according to invention is a precondition for transmissionof the data of the disparity mesh with the goal to decrease the numberof triangles.

In one embodiment of the invention, the step filtering planes comprises:

for 2D-lines in the 2D-spaces X-D,Y-D,

-   -   detecting a 2D-line with at least two neighbour points,    -   iterative, determining line points of the detected 2D-line and        adapting the 2D-line, and    -   modifying the line points to 2D-line locations of the 2D-line.

In one embodiment, a 2D-line with at least two neighbour points isdetected if the 2D-line comply with a line equation in the 2D-space X-Dor Y-D with parameters slope a and constant b:D=a*X+b,Y=constant orD=a*Y+b,X=constant.

After a 2D-line with at least two line points, i.e. two neighbourpoints, is detected, one after another point next to a line point isexamined. When an examined point is determined as a line point, i.e. itbelongs to the 2D-line, the 2D-line is adapted to all line pointsincluding the new determined line point. If no further line point isfound, the line points are modified to 2D-line locations.

In one embodiment, an examined point is determined as a line point ofthe 2D-line if an absolute difference of the disparity D between theexamined point and a pre-determined line point is less than or equal toone quantization pitch and if its distance from the 2D-line is lower orequal to a threshold. The examination is mentioned as a test a priori.This threshold is also mentioned as first 2D-line threshold.

In one embodiment, a further examination is carried out, where anexamined point is determined as a line point of the 2D-line if itsdistance from the 2D-line which is adapted including the examined pointis lower or equal to a threshold. The examination is mentioned as a testa posteriori. This threshold is also mentioned as second 2D-linethreshold. In one embodiment, the second 2D-line threshold correspondsto the first line threshold. In an alternative embodiment, the value ofthe second 2D-line threshold is smaller than that of the first 2D-linethreshold.

In one embodiment of the invention, the 2D-line is defined with anormalized direction vector V which is the normalized Eigen vector ofthe covariance matrix COV of the line points with the greatest Eigenvalue and a gravity centre M of the line points.

The 2D-line is adapted to all line points, e.g. to include a newdetermined line point, by determining its parameters of the normalizeddirection vector V and of the gravity centre M again where the values ofthe new determined line point are incorporated. In addition, the slope aand the constant b are also determined again.

In one embodiment, a line point is modified to a 2D-line location of the2D-line by projecting the line point onto the 2D-line.

In one embodiment, a line point I is projected onto the 2D-line, andthereby modified to a 2D-line location I′, by computing the scalarproduct S of the vector MI from the gravity centre M of the line pointsto the line point I with the normalized direction vector V of the2D-line and adding to the gravity centre M the normalized directionvector V multiplied by the scalar product S. Thus, if no further linepoint is found, the line points are modified to 2D-line locations.

In one embodiment, the method comprises the step:

-   -   filtering contours in the (three dimensional) 3D-space X-Y-D        before filtering planes.

By filtering contours before filtering planes, aliasing of contours isdiminished and the filtering of planes is improved.

In one embodiment of the invention, the step filtering contourscomprises:

-   -   detecting contour points of contours,    -   iterative, determining contour points to segment points of a        3D-line segment of a 3D-line and adapting the 3D-line, and,    -   modifying the segment points to 3D-line points of the 3D-line.

After contour points are detected, they are examined if they belong to a3D-line segment of a 3D-line. When a contour point is determined as asegment point the corresponding 3D-line is adapted to all segment pointsincluding the new determined segment point. If no further segment pointis found, the segment points are modified to 3D-line points.

In one embodiment of the invention, an examined point is detected as acontour point if an absolute difference of the disparity D between theexamined point and a surrounding point is greater than one quantizationpitch.

In one embodiment of the invention, a contour point is determined as asegment point of the 3D-line segment of the 3D-line, if an absolutedifference of the disparity D between the contour point and apre-determined segment point is less than or equal to one quantizationpitch and if its distance from the 3D-line is lower or equal to athreshold. This threshold is also mentioned as a 3D-line threshold.

In one embodiment of the invention, the 3D-line is defined with anormalized direction vector V which is the normalized Eigen vector ofthe covariance matrix COV of the segment points with the greatest Eigenvalue and a gravity centre M of the segment points.

The 3D-line is adapted to all segment points, e.g. to include a newdetermined segment point, by determining its parameters of thenormalized direction vector V and of the gravity centre M again wherethe values of the new determined segment point are incorporated.

In one embodiment of the invention, segment point G is modified to a3D-point P of the 3D-line by projecting the segment point G onto the3D-line.

In one embodiment of the invention, a segment point G is projected ontothe 3D-line by computing the scalar product S between the vector MG froma gravity centre M to the segment point G and the normalized directionvector V of the 3D-line and adding to the gravity centre M thenormalized direction vector V multiplied by the scalar product S.

The invention will be explained in more detail using exemplaryembodiments and the following figures.

4. LIST OF FIGURES

The invention will be better understood, and other specific features andadvantages will emerge upon reading the following description, thedescription making reference to the annexed drawings wherein:

FIG. 1 shows a schematic diagram illustrating detecting contour pointsof step filtering contours;

FIG. 2 shows a schematic diagram illustrating determining segment pointsof step filtering contours;

FIG. 3 shows parameters and a schematic diagram illustrating modifyingsegment points to 3D-line points of step filtering contours;

FIG. 4 shows an overall picture and two partial pictures, where the leftpartial picture is not filtered and the right partial picture isfiltered by filtering contours;

FIG. 5 shows a schematic diagram illustrating determining plane pointsof step filtering planes;

FIG. 6 shows parameters and a schematic diagram illustrating modifyingline points to 2D-line locations of step filtering planes;

FIG. 7 shows the overall picture of FIG. 4 and two other partialpictures, where the left partial picture is not filtered and the rightpartial picture is filtered by filtering contours and planes;

FIG. 8 shows the two partial picture of FIG. 7 after decimation;

FIG. 9 shows a natural scene with four pictures, where, at the top, theleft picture is not filtered and the right picture is filtered byfiltering contours and planes and, on the bottom, the both pictures areafter a VTK-decimation.

5. DETAILED DESCRIPTION OF THE INVENTION

The invention concerns a method of filtering a disparity mesh obtainedfrom pixel images. The disparity mesh comprises a plurality of pointswhere each point is associated with values of two planar coordinates X,Y and a disparity value D, i.e. it corresponds to a pixel. The planarcoordinates X, Y corresponds to e.g. the coordinates of two-dimensionalview and the disparity value D e.g. to a depth. The values arequantization pitches, e.g. integers.

According to one embodiment of the invention, the method of filteringthe disparity mesh comprises two steps: filtering contours and filteringplanes, where the filtering contours is carried out before the filteringplanes.

The step filtering contours which is executed in the (three-dimension)3D-space X-Y-D comprises: detecting contour points of contours,iterative, determining contour points to segment points of a 3D-linesegment of a 3D-line and adapting the 3D-line, and modifying segmentpoints to 3D-line points of the 3D-line.

In order to detect contour points of contours of objects, a contour mapon D with marked contour points is created. An examined point isdetected as a contour point if an absolute difference of the disparity Dbetween the examined point and a surrounding point is greater than onequantization pitch, i.e. that the absolute difference amounts at leasttwo quantization pitches. In particular, for each examined point withcertain values of its X- and Y-coordinates and with a certain disparityD value, the disparity D value of each of the eight surrounding pointare compared with its disparity D value. If the absolute difference Dbetween the value of the examined point and of at least one surroundingpoint is greater than the quantization pitch, the examined point isdetected as a contour point. Then, the examined point is marked as acontour point. Detecting contour points is shown in FIG. 1 where, in theupper picture, e.g. points with a high disparity D are marked asbackground and points with a lower disparity D as foreground and wherein the lower picture corresponding contours at background and atforeground are marked.

The detected contour points are examined if they build 3D-line segments,also mentioned as 3D-linear segments, of a 3D-line. A 3D-line is a linein the 3D-space X-Y-D of the X- and Y-coordinates and the disparity D. Acontour point is determined as a segment point of the 3D-line segment ofthe 3D-line if an absolute difference of the disparity D between thecontour point and a pre-determined segment point is less than or equalto one quantization pitch and if its distance from the 3D-line is loweror equal to a threshold. This threshold is also mentioned as a 3D-linethreshold.

Determining contour points to segments points of a 3D-line segment whichis schematically shown in FIG. 2 is performed e.g. as follows:

A contour map with the contour points is scanned in order to determine3D-line segments. The first not processed contour point is chosen.Contour points next to the first chosen contour point and, if so, nextto a pre-determined contour point are iterative examined.

If the absolute difference of the disparity D between the examinedcontour point and the first chosen contour point is less than or equalto one quantization pitch, it belongs to the same contour. The twocontour points are determined as segment points of a 3D-line segmentwith the two points. A corresponding 3D-line extending through thesegment points is calculated.

In the following, determining the first contour points to segment pointsis described in detail. The pixel image, i.e. the disparity mesh withthe points, where some points are marked as contour points, is scannedfrom left to right and downward in order to find a first contour pointof a 3D-line segment (see upper picture of FIG. 2). Then, the firstimmediate neighbour point of the first chosen contour point which isalso a contour point is chosen as a second contour point of the 3D-linesegment. With the two contour points the initial parameters of the3D-line segment and with that of the corresponding 3D-line arecalculated.

Then, contour points around a pre-determined segment point are examined.If the absolute difference of the disparity D between the examinedcontour point and the pre-determined segment point is less than or equalto one quantization pitch and if the distance of the examined point tothe 3D-line is less than a 3D-line threshold, the examined contour pointis determined as a next segment point. The corresponding 3D-line isadapted to extend through all determined segment points.

In particular, to search a next candidate of the contour points whichcan be incorporated into the 3D-line segment, the slope of thecorresponding 3D-line in the X-Y space is used, i.e. only the variableX, Y are considered (see middle picture of FIG. 2).

The detected slope is classified into one of five possible directions:east (h), south-east (d1), south (v), south-west (d2) and west (h_n).When the direction of the 3D-line segment is determined, possiblecandidates which are shown in the lower picture of FIG. 2 as light greypoint for each direction are examined. One or two points can be acceptedif they are also contour points and depending on their distances to the3D-line. I.e., one or two of neighbour contour points in the rightdirection are determined as segment points if their distances to the3D-line are less than the 3D-line threshold.

If a point is determined as a segment point, its property of being acontour point is cleared so it can not be considered anymore.

When no further contour point around a pre-determined segment point canbe determined as segment point of the mentioned 3D-line segment, theiteration stops. The 3D-line segment is mentioned as finished. Thesegment points are modified to 3D-line points, i.e. they are projectedonto the 3D-line.

After a 3D-line segment is finished, a next 3D-line segment is searched.For searching the first point of a next 3D-line segment, the point justafter (at right in FIG. 2) the first point of the pre-determined 3D-linesegment is examined. If it is a contour point its neighbour point isexamined and so on.

In order to evaluate parameters of a 3D-line a normalized directionvector V and a gravity centre M of the segment points of the 3D-linesegment are computed. The normalized direction vector V is thenormalized Eigen vector of the covariance matrix COV of the segmentpoints associated with the greatest Eigen value. I.e. the 3D-line (Δ inFIG. 3) is defined with the normalized direction vector V and thegravity centre M of the segments points.

In particular, for a 3D-line with S segment points with values xi, yiand di, where i=1 to S, the values of the variables xM, yM and dM of thegravity centre M of the segment points and the variances σx², . . . andcovariances σxy, σxd . . . the covariance matrix COV of the segmentpoints are calculated from values of variables X, Y and D of the segmentpoints as following:xM=mx=Sum(xi)/SyM=my=Sum(yi)/SdM=my=Sum(di)/Sσx ²=Sum[(x _(i) −mx)²]/(S−1)σy ²=Sum[(y _(i) −my)²]/(S−1)σd ²=Sum[(d _(i) −md)²]/(S−1)σxy=Sum[(x _(i) −mx)(y _(i) −my)]/(S−1)σxd=Sum[(x _(i) −mx)(d _(i) −md)]/(S−1)σyd=Sum[(y _(i) −my)(d _(i) −md)]/(S−1).

In order to project a segment point G with values xg, yg and dg of itsvariables X, Y and D onto the 3D-line, the values xp, yp and dp of itsprojected point P, i.e. its 3D-line point P, are computed as a sum ofthe values of the gravity centre M and values of the normalizeddirection vector V multiplied with a scalar product S of the vector MGfrom the gravity centre M to the segment point G and the normalizeddirection vector V of the determined 3D-line. I.e. a segment point G ismodified to a 3D-line point P by adding to the gravity centre M thenormalized direction vector V multiplied with the a.m. scalar product S.

The formulas, mentioned above, are shown in the pictures at the top ofFIG. 3. The pictures on the bottom of FIG. 3 illustrate determiningsegment points of a 3D-line segment and projecting them onto thecorresponding 3D-line. I.e. the segment points are modified to 3D-linepoints.

By modifying the segment points to 3D-line points, the values of theirvariables X, Y, D are modified, i.e. the position of the original pointsare displaced. The mesh, also mentioned as grid, is no more regular inX, Y plane. However the connectivity, which is e.g. their rank in thegrid, remains the same.

FIG. 4 shows an example of this step filtering contours using twopartial pictures with a silhouette of a table which is depicted in theoverall picture. The background is the wall. In particular, the contourbeneath the table shows aliasing effects in the left, not filteredpartial picture. The contours of the right, filtered partial picture arestraightened.

The step filtering planes is performed by filtering 2D-lines in2D-spaces X-D, Y-D of the planar coordinates X, Y and the disparity D.It is shown in FIGS. 5 and 6 and comprises: for (two-dimensional)2D-lines in the 2D-spaces X-D, Y-D: detecting a 2D-line in 2D-spacesX-D, Y-D with at least two neighbour points, iterative, determining linepoints of the detected 2D-line and adapting the 2D-line, and modifyingthe line points to 2D-line locations of the 2D-line.

A 2D-line in 2D-spaces X-D and Y-D is searched by choosing a start pointand a neighbour point in one of the 2D-spaces X-D, Y-D. A 2D-line isdetected, if at least these two neighbour points of the disparity meshbelong to a line equationD=a*Y+b,where the value of X is constant, orD=a*X+b,where the value of Y is constant.

The parameters of the equations are a slope a and a constant b.

As the coordinates X and Y and the disparity D are orthogonal, if pointsbelong to a plane in this 3D-space, these points belong to a 2D-line inthe 2D-space X-D, where Y is constant, or in the 2D-space Y-D, where Xis constant. Therefore all 2D-lines fulfilling the above mentioned lineequation, i.e. all points belonging to those 2D-lines, are searched.

The slope a of the line equation is defined with the relation betweenthe covariance σxd, σyd of the planar coordinate X, Y and the disparityD of the line points and the variance σx², σy² of the planar coordinateX, Y of the line points (see FIG. 6):a=σxd/σx ² ora=σyd/σy ².

The constant b is defined with the slope a and a gravity centre M of theline points, which has the values mx and md or my and md, in anequation:b=mx−a*md orb=my−a*md.

In particular, for a 2D-line with N line points (xi, di) or (yi, di),where i=1 to N, the a.m. parameters are calculated as following:mx=Sum(x _(i))/N ormy=Sum(y _(i))/N andmd=Sum(d _(i))/N,σxd=Sum[(x _(i) −mx)(d _(i) −md)]/(N−1) orσyd=Sum[(y _(i) −my)(d _(i) −md)]/(N−1) andσx ²=Sum[(x _(i) −mx)²]/(N−1) orσy ²=Sum[(y _(i) −my)²]/(N−1).

For each detected 2D-line, an iterative process is performed (see FIG.5, left side): An examined neighbour point is determined as a line pointbelonging to the 2D-line if an absolute difference of the disparity Dbetween the examined point and a pre-determined line point is less thanor equal to one quantization pitch and if its distance from the 2D-lineis lower or equal to a threshold. The 2D-line is adapted extendingthrough the line points.

In one embodiment, the examination if a neighbour point belongs to the2D-line is made twice. In a first examination, mentioned as test apriori, an examined point is accepted as a line point if its distancefrom the 2D-line adapted to the line points without the examined pointis lower or equal to a threshold. The threshold is mentioned as a first2D-line threshold. In a following examination, mentioned as test aposteriori, an examined point is accepted as a line point if itsdistance from the 2D-line adapted to the line points with the examinedpoint is lower or equal to a threshold. This threshold is mentioned as asecond 2D-line. In one embodiment, the thresholds have the same value.The tests are depicted in FIG. 5 on the right side.

In order to evaluate parameters of a 2D-line a normalized directionvector V and a gravity centre M of the line points are calculated. Thenormalized direction vector V is the normalized Eigen vector of thecovariance matrix COV of the line points with the greatest Eigen valueand a gravity centre M of the line points. The calculation of the valuesmx, md or my, md of the gravity centre M and the covariance σxd or σxyand the variance σx² or σy² of the covariance matrix COV is describedabove.

If no further neighbour point of the line points along a 2D-line can bedetermined as a line point, the iteration stops. The line points aremodified to 2D-line locations of the 2D-line, i.e. they are projectedonto the 2D-line.

In order to project a line point I with values xi, di or yi, di of itsvariables X, D or Y, D onto the 2D-line, the values xi′, di′ or yi′, di′of its projected point I′ are computed as a sum of the values of thegravity centre M and values of a scalar product S of the vector MI fromthe gravity centre to the line point I and the normalized directionvector V of the 2D-line. I.e. a line point I is modified to a 2D-linelocation I′ by adding to the gravity centre M the normalized directionvector multiplied with the a.m. scalar product S.

The normalized direction vector V is also calculated with the slope a ofthe line equation:V=(1/sqrt(1+a ²),a/sqrt(1+a ²)).

Further, for a line point I (xi, di), the a.m. parameters are:MI=(xi−mx,di−md),S=I*MI=xi*(xi−mx)+di*(di−md),I′=I+S*V=(mx+S/sqrt(1+a ²),md+a*S/sqrt(1+a ²)).

In particular, a line point I with values xi and di is projected ontoits 2D-line with the slope a and the constant b, where the value of theplanar coordinate Y is constant, the values of its projected point I′,i.e. the 2D-line location I′, are computed as:

${{x^{\prime}i} = {\frac{{xi} + {a*{di}} - a}{a^{2} + 1}*b}},$andd′i=a*x′i+b.

The formulas of the slope a and the constant b as well as the formulasof the 2D-line location I′ are shown in the left picture of FIG. 6. Thepictures on the right side of FIG. 6 illustrate determining points ofthe 2D-line and projecting them onto the corresponding 2D-line. I.e. theline points are modified to 2D-line locations.

FIG. 7 shows a left partial picture which is not filtered and a rightpartial picture which is filtered in two steps: filtering contours andfiltering planes. The left partial picture demonstrate aliasing steps atcontours and planes, while on the filtered picture of the right side,the contours are more straight and the planes are more flat.

The effect of this filtering after diminishing the amount of data isshown in FIGS. 8 and 9. FIG. 8 depicts the two partial pictures of FIG.7, without and with filtering, after diminishing and demonstrates thatthe decimation is around 3 times more efficient after the filtering(contours and planes) according to the invention:

The depth image is 960×540 points, the texture image is 960×540 pixels:

-   -   Before decimation        -   518400 points.        -   1033802 triangles.    -   After decimation on original mesh        -   19358 points.        -   35718 triangles.    -   After decimation on filtered mesh        -   6668 points.        -   10338 polygons.

In FIG. 9 the filtering or not and diminishing with a VTK-software (VTKDecimate Pro method) is demonstrated with the help of another picture,namely a natural scene: The performance of the decimation is equallyaround 3 times more efficient after the filtering according to theinvention.

In another embodiment of the invention only the step filtering planes byfiltering 2D-lines in 2D-spaces X-D, Y-D of the planar coordinates X, Yand the disparity D is worked out. This embodiment is advantageouslyapplied to disparity meshes with minor contour aliasing effects. Asaliasing of contours is mainly due to pixel relative size, this could bethe case when processing an HD image (with at least 2 Kbyte pixels wide)which is associated with disparity values D (or with similar values) andwhich has a low dynamic range, e.g. less than 256 quantization steps. Inthis case, the quantization on contours due to a quantization of theplanar coordinates X and Y becomes neglectable versus the quantizationof the disparity values D.

The invention claimed is:
 1. Method of filtering a disparity meshobtained from pixel images, the disparity mesh comprising a plurality ofpoints, each point being associated with values of two planarcoordinates and a disparity value, the values being quantizationpitches, wherein the method comprises filtering planes by filtering2D-lines in 2D-spaces of the planar coordinates and the disparity, saidfiltering being implemented by a processor and comprising, for the2D-lines in the 2D-spaces: detecting, by said processor, a 2D-line withat least two neighbour points, iterative, determining, by saidprocessor, line points of the detected 2D-line and adapting the 2D-line,an examined point being determined as a line point of the 2D-line if anabsolute difference of the disparity between the examined point and apre-determined line point is less than or equal to one quantizationpitch and if its distance from the 2D-line is lower or equal to athreshold, and modifying, by said processor, the line points to 2D-linelocations of said 2D-line.
 2. Method according to claim 1, wherein the2D-line with at least two neighbour points is detected if the 2D-linewith the at least two neighbour points comply a line equation with theparameters slope (a) and constant (b) in the 2D-space:D=a*Y+b,X=const orD=a*X+b,Y=const.
 3. Method according to claim 1, wherein an examinedpoint is determined as a line point of the 2D-line if its distance fromthe 2D-line, which is adapted including the examined point, is lower orequal to a threshold.
 4. Method according to claim 1, wherein the2D-line with line points is defined with a normalized direction vectorwhich is the normalized Eigen vector of the covariance matrix of theline points with the greatest Eigen value and a gravity centre of theline points.
 5. Method according to claim 1, wherein a line point ismodified to a 2D-line location of the 2D-line by projecting the linepoint onto the 2D-line.
 6. Method according to claim 5, wherein the linepoint is projected onto the 2D-line by computing the scalar product ofthe vector from the gravity centre of the line points to the line pointwith the normalized direction vector of the 2D-line and adding to thegravity centre the normalized direction vector multiplied by the scalarproduct.
 7. Method according to claim 1, wherein the method comprisesthe step of: filtering contours in a 3D-space filtering planes. 8.Method according to claim 7, wherein the step of filtering contours inthe 3D-space comprises: detecting contour points of contours, iterative,determining contour points to segment points of a 3D-line segment of a3D-line and adapting the 3D-line, and, modifying the segment points to3D-line points of said 3D-line.
 9. Method according to claim 8, whereinan examined point is detected as a contour point if an absolutedifference of the disparity between the examined point and a surroundingpoint is greater than one quantization pitch.
 10. Method according toclaim 9, wherein a contour point is determined as a segment point of the3D-line segment of the 3D-line if an absolute difference of thedisparity between the contour point and a pre-determined segment pointis less than or equal to one quantization pitch and if its distance fromthe 3D-line is lower or equal to a threshold.
 11. Method according toclaim 10, wherein the 3D-line is defined with a normalized directionvector which is the normalized Eigen vector of the covariance matrix ofthe segment points with the greatest Eigen value and a gravity centre ofthe segment points.
 12. Method according to claim 11, wherein a segmentpoint is modified to a 3D-line point of the 3D-line by projecting thesegment point onto the 3D-line.
 13. Method according to claim 12,wherein a segment point is projected onto the 3D-line by computing thescalar product between the vector from the gravity centre to the segmentpoint and the normalized direction vector of the 3D-line and adding tothe gravity centre the normalized direction vector multiplied by thescalar product.